local function OnSpDelta(inst)
    local point = inst.replica.i26skill:GetPoint()
    inst:PushEvent("i26spdelta", {point = point})
end

local i26skill = Class(function(self, inst)
    self.inst = inst

    self.max = 5
    self.skillpoint = net_smallbyte(inst.GUID, "i26skill.sp", "i26spdirty")

    if not TheWorld.ismastersim then
        inst:ListenForEvent("i26spdirty", OnSpDelta)
    end
end)

function i26skill:GetPoint()
    if self.inst.components.i26skill ~= nil then
        return self.inst.components.i26skill.skillpoint
    elseif self.skillpoint:value() ~= nil then
        return self.skillpoint:value()
    end
    return 0
end

function i26skill:SetPoint(val)
    self.skillpoint:set(val)
end

return i26skill